package com.sxt.opd.controller;




import com.sxt.opd.vo.GuahaoVo;
import com.sxt.springcloud.opd.GuahaoClientService;
import com.sxt.sys.common.DataGridView;
import com.sxt.sys.common.ResultObj;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;



/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2020-01-08
 */
@RestController
@RequestMapping("/guahao")
public class GuahaoController {

    @Autowired
    private GuahaoClientService guahaoClientService;

    /**
     * 查询
     */
    @RequestMapping("loadAllGuahao")
    public DataGridView loadAllGuahao(GuahaoVo guahaoVo) {
        return this.guahaoClientService.loadAllGuahao(guahaoVo);
    }
    /**
     * 添加
     */
    @RequestMapping("addGuahao")
    public ResultObj addGuahao(GuahaoVo guahaoVo,String userName) {
        return this.guahaoClientService.addGuahao(guahaoVo,userName);
    }
    /**
     * 修改
     */
    @RequestMapping("updateGuahao")
    public ResultObj updateGuahao(GuahaoVo guahaoVo) {
        return this.guahaoClientService.updateGuahao(guahaoVo);
    }
    /**
     * 删除
     */
    @RequestMapping("deleteGuahao")
    public ResultObj deleteGuahao(Integer id){
        return this.guahaoClientService.deleteGuahao(id);
    }

}

